package com.evany.cloud.evanyCommon.util;

/**
 * @author yuez
 * @date 2018/2/2
 */
public class IdUtil {

	/**
	 * id生成工具类
	 **/
	public static IdWorker idWorker;


	/**
	 * 获取全局唯一id，支持分布式
	 **/
	public static long generateId() {
		if (idWorker == null) {
			throw new RuntimeException("idWorker实例为空，需要初始化设置");
		}
		return idWorker.nextId();
	}


}